package com.vedio.entity;

import java.util.Date;
import java.util.Objects;

public class Order {
    private Integer id;
    private Integer userid;
    private Integer movieid;
    private Date ordertime;
    private Integer paystate;
    private Double cost;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Order order = (Order) o;
        return Objects.equals(id, order.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userid=" + userid +
                ", movieid=" + movieid +
                ", ordertime=" + ordertime +
                ", paystate=" + paystate +
                ", cost=" + cost +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Integer getMovieid() {
        return movieid;
    }

    public void setMovieid(Integer movieid) {
        this.movieid = movieid;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public Integer getPaystate() {
        return paystate;
    }

    public void setPaystate(Integer paystate) {
        this.paystate = paystate;
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public Order(Integer id, Integer userid, Integer movieid, Date ordertime, Integer paystate, Double cost) {
        this.id = id;
        this.userid = userid;
        this.movieid = movieid;
        this.ordertime = ordertime;
        this.paystate = paystate;
        this.cost = cost;
    }

    public Order() {
    }
}
